package com.qinglei.recoup.common.domain;

/**
 * RECOUP常量
 */
public class CommonConstant {
    /**
     * 成功标记
     */
    public static final Integer SUCCESS = 0;
    /**
     * 失败标记
     */
    public static final Integer FAIL = 1;

    /**
     * 删除
     */
    public static final Integer STATUS_DEL = 1;
    /**
     * 正常
     */
    public static final Integer STATUS_NORMAL = 0;

    /**
     * 有效（正常）
     */
    public static final int STATUS_ENABLE = 1;
    /**
     * 无效（禁用）
     */
    public static final int STATUS_DISABLE = 0;

    public static final String UNDER_LINE = "_";
    // user缓存前缀
    public static final String USER_CACHE_PREFIX = "recoup.cache.user.";
    // user角色缓存前缀
    public static final String USER_ROLE_CACHE_PREFIX = "recoup.cache.user.role.";
    // user权限缓存前缀
    public static final String USER_PERMISSION_CACHE_PREFIX = "recoup.cache.user.permission.";

    // dict缓存前缀
    public static final String DICT_ITEM_CACHE_PREFIX = "recoup.cache.dict.item.";

    // user部门数据权限缓存前缀
    public static final String USER_PERMISSION_DEPT_DATA_CACHE_PREFIX = "recoup.cache.user.dept.data.permission.";
    // user个性化配置前缀
    public static final String USER_CONFIG_CACHE_PREFIX = "recoup.cache.user.config.";
    // token缓存前缀 key=token,val=token
    public static final String TOKEN_CACHE_PREFIX = "recoup.cache.token.";

    // 微信用户
    public static final String TOKEN_CACHE_SESSIONKEY = "recoup.cache.sessionkey.";

    // 存储在线用户的 zset前缀 score=毫秒时间戳 member=userId
    public static final String ACTIVE_USERS_ZSET_PREFIX = "recoup.user.active";
    // 存储在线用户的 token前缀 key=userId val=token
    public static final String USER_TOKEN_CACHE_PREFIX = "recoup.cache.user.token.";

    /**
     * 离床超时阈值
     */
    public static final String CACHE_OUT_BED_TIMEOUT = "recoup.cache.out.bed.timeout";
    /**
     * 异常事件接单超时阈值
     */
    public static final String CACHE_TAKE_EVENT_TIMEOUT = "recoup.cache.take.event.timeout";
    /**
     * 异常事件接单超时阈值缓存区（Hash） key-租户ID val-超时时间 单位秒
     */
    public static final String TAKE_EVENT_TIMEOUT_CACHE_PREFIX = "recoup.take.event.timeout";

    /**
     * 离床超时待定区 score-变更为离床状态的秒级时间戳 member-床位ID
     */
    public static final String OUT_BED_ZSET_PREFIX = "recoup.out.bed";
    /**
     * 床位监测时间段-开始时间缓存区 score-下次到达开始时间秒级时间戳 member-BedMonitorTimeVO
     */
    public static final String BED_MONITOR_TIME_START_ZSET_PREFIX = "recoup.bed.monitor.time.start";
    /**
     * 床位监测时间段-结束时间缓存区（Zset） score-下次到达结束时间秒级时间戳 member-BedMonitorTimeVO
     */
    public static final String BED_MONITOR_TIME_END_ZSET_PREFIX = "recoup.bed.monitor.time.end";
    /**
     * 床位当前监测时间段缓存区（Hash） key-床位ID val-BedMonitorTimeVO
     */
    public static final String BED_CUR_MONITOR_TIME_CACHE_PREFIX = "recoup.bed.cur.monitor.time";

    /**
     * 巡视时间段-开始时间缓存区（Zset） score-下次到达开始时间秒级时间戳 member-BedMonitorTimeVO
     */
    public static final String TOUR_TIME_START_ZSET_PREFIX = "recoup.tour.time.start";
    /**
     * 巡视时间段-结束时间缓存区（Zset） score-下次到达结束时间秒级时间戳 member-BedMonitorTimeVO
     */
    public static final String TOUR_TIME_END_ZSET_PREFIX = "recoup.tour.time.end";
    /**
     * 当前巡视时间段缓存区（Hash） key-租户ID val-TourTimeVO
     */
    public static final String CUR_TOUR_TIME_CACHE_PREFIX = "recoup.cur.tour.time";
    /**
     * 异常报警-待接单事件缓存区（Zset） score-异常事件发生时的秒级时间戳 member-EventBedBO
     */
    public static final String WAIT_TAKE_EVENT_ZSET_PREFIX = "recoup.wait.take.event";
    /**
     * 在线设备缓冲区（Zset） score-设备最后上传数据秒级时间戳 member-设备SN
     */
    public static final String ONLINE_RADAR_ZSET_PREFIX = "recoup.online.radar";
    public static final String NETWORK_RADAR_ZSET_PREFIX = "recoup.network.radar";

    // 排序规则： descend 降序
    public static final String ORDER_DESC = "descend";
    // 排序规则： ascend 升序
    public static final String ORDER_ASC = "ascend";

    // 按钮
    public static final String TYPE_BUTTON = "1";
    // 菜单
    public static final String TYPE_MENU = "0";

    //数据范围权限
    public static final int DATA_FILTER_ALL=0;
    public static final int DATA_FILTER_DEPT=1;
    public static final int DATA_FILTER_OWN=2;

    /**
     * 添加账号防止重复锁
     */
    public static final String USER_ADD_LOCK_PREFIX = "user.add.lock.";
    /**
     * 添加账号防止重复锁超时
     */
    public static final int USER_ADD_LOCK_TIMEOUT = 60;
    /**
     * 同步健康数据防止重复锁
     */
    public static final String IMPORT_HEALTH_DATA_LOCK_PREFIX = "import.health.data.lock.";

    /**
     * 同步健康数据4.0防止重复锁
     */
    public static final String IMPORT_HEALTH_DATA_LOCK_PREFIXV4 = "import.health.data.lockv4.";

    /**
     * 同步健康数据防止重复锁超时
     */
    public static final int IMPORT_HEALTH_DATA_LOCK_TIMEOUT = 3600;

    /**
     * 养老院项目直连交换机
     */
    public static final String MQ_RECOUP_DIRECT_EXCHANGE = "RecoupDirectExchange";
    /**
     * 雷达数据路由键
     */
    public static final String MQ_RADAR_DATA_ROUTING = "RadarDataRouting";
    /**
     * 雷达数据队列
     */
    public static final String MQ_RADAR_DATA_QUEUE = "RecoupRadarDataQueue";


    /**
     *呼吸数据正常队列
     */
    public static final String BREATH_BPM_NOMAL = "recoup.breath.bpm.nomal";
    /**
     *呼吸BPM最高数据队列
     */
    public static final String BREATH_BPM_HIGHT_TIME_START = "recoup.breath.bpm.hight.time.start";
    /**
     *呼吸BPM最低数据队列
     */
    public static final String BREATH_BPM_LOW_TIME_START = "recoup.breath.bpm.low.time.start";


    /**
     *心跳数据正常队列
     */
    public static final String HEART_BPM_NOMAL = "recoup.heart.bpm.nomal";

    /**
     *心跳BPM最高数据队列
     */
    public static final String HEART_BPM_HIGHT_TIME_START = "recoup.heart.bpm.hight.time.start";
    /**
     *心跳BPM最低数据队列
     */
    public static final String HEART_BPM_LOW_TIME_START = "recoup.heart.bpm.low.time.start";


    /**
     *呼吸BPM最高数据队列
     */
    public static final String BREATH_BPM_HIGHT_TIME_STARTV4 = "recoup.breath.bpm.hight.time.startv4";

    /**
     *呼吸BPM最低数据队列
     */
    public static final String BREATH_BPM_LOW_TIME_STARTv4 = "recoup.breath.bpm.low.time.startv4";
    /**
     * 更新设备版本状态
     */
    public static final String JOBIDCACHE_RADAR_STATUS = "WEB:IOT:UPDATEJOBID";

    /**
     * 雷达真实在线状态
     */
    public static final String ONLINE_REAL_RADAR_ZSET_PREFIX = "WEB:RECOUP:RADAR:REAL:ONLINE:";

    /**
     * 大屏养老院项目广播交换机
     */
    public static final String MQ_DASHBOARD_RECOUP_DIRECT_EXCHANGE = "DashBoardRecoupDirectExchange";

    /**
     * 大屏雷达数据队列
     */
    public static final String MQ_DASHBOARD_RADAR_DATA_QUEUE = "DashBoardRecoupRadarDataQueue";

    /**
     * 大屏雷达数据路由键
     */
    public static final String MQ_RADAR_DATA_TOPIC_ROUTING_KEY = "RadarDataTopicRoutingKey.*";



    public static final String WEB_REAL_TIME_DATA_DEVICE_SINGULAR_NUM = "WEB:REAL:TIME:DATA:DEVICE:SINGULAR:NUM:";
    public static final String WEB_REAL_TIME_DATA_DEVICE_SINGULAR_IS = "WEB:REAL:TIME:DATA:DEVICE:SINGULAR:IS:";


}
